/ MacTech 1 to 12
/ MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 2 code / Using C++ objects.sea / Using C++ objects / PtrObject.h ![]() | < prev | next > |
MacBinary | 1990-08-13 | 1.4 KB | [TEXT/MPS ] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, inited, Mon Aug 13 14:58:33 1990, modified Mon Aug 13 14:58:33 1990, creator 'MPS ', type ASCII, 753 bytes "PtrObject.h" , at 0x371 428 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [MPS ] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 50 74 72 4f 62 6a | 65 63 74 2e 68 00 00 00 |..PtrObj|ect.h...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 02 f1 00 | 00 01 ac a2 ec a8 d9 a2 |........|........|
|00000060| ec a8 d9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d5 44 00 00 |........|.....D..|
|00000080| 23 69 66 6e 64 65 66 20 | 5f 5f 50 54 52 4f 42 4a |#ifndef |__PTROBJ|
|00000090| 45 43 54 5f 5f 0d 23 64 | 65 66 69 6e 65 20 5f 5f |ECT__.#d|efine __|
|000000a0| 50 54 52 4f 42 4a 45 43 | 54 5f 5f 0d 0d 23 69 66 |PTROBJEC|T__..#if|
|000000b0| 6e 64 65 66 20 5f 5f 54 | 59 50 45 53 5f 5f 0d 09 |ndef __T|YPES__..|
|000000c0| 23 69 6e 63 6c 75 64 65 | 20 3c 54 79 70 65 73 2e |#include| <Types.|
|000000d0| 68 3e 0d 23 65 6e 64 69 | 66 0d 0d 23 69 66 6e 64 |h>.#endi|f..#ifnd|
|000000e0| 65 66 20 5f 5f 53 54 44 | 44 45 46 5f 5f 0d 09 23 |ef __STD|DEF__..#|
|000000f0| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 64 65 66 2e |include |<stddef.|
|00000100| 68 3e 0d 23 65 6e 64 69 | 66 0d 0d 63 6c 61 73 73 |h>.#endi|f..class|
|00000110| 20 50 74 72 4f 62 6a 65 | 63 74 20 7b 0d 70 75 62 | PtrObje|ct {.pub|
|00000120| 6c 69 63 3a 0d 09 73 74 | 61 74 69 63 20 4f 53 45 |lic:..st|atic OSE|
|00000130| 72 72 09 41 6c 6c 6f 63 | 48 65 61 70 28 73 69 7a |rr.Alloc|Heap(siz|
|00000140| 65 5f 74 20 68 65 61 70 | 53 69 7a 65 29 3b 0d 09 |e_t heap|Size);..|
|00000150| 2f 2f 20 43 72 65 61 74 | 65 20 61 20 68 65 61 70 |// Creat|e a heap|
|00000160| 20 68 65 61 70 53 69 7a | 65 20 62 79 74 65 73 20 | heapSiz|e bytes |
|00000170| 6c 6f 6e 67 20 74 6f 0d | 09 2f 2f 20 61 6c 6c 6f |long to.|.// allo|
|00000180| 63 61 74 65 20 6f 62 6a | 65 63 74 73 20 69 6e 2e |cate obj|ects in.|
|00000190| 0d 0d 09 73 74 61 74 69 | 63 20 76 6f 69 64 09 09 |...stati|c void..|
|000001a0| 44 69 73 70 6f 73 65 48 | 65 61 70 28 29 3b 0d 09 |DisposeH|eap();..|
|000001b0| 2f 2f 20 46 72 65 65 20 | 75 70 20 74 68 65 20 68 |// Free |up the h|
|000001c0| 65 61 70 20 61 6c 6c 6f | 63 61 74 65 64 20 62 79 |eap allo|cated by|
|000001d0| 20 61 20 70 72 65 76 69 | 6f 75 73 0d 09 2f 2f 20 | a previ|ous..// |
|000001e0| 63 61 6c 6c 20 74 6f 20 | 41 6c 6c 6f 63 48 65 61 |call to |AllocHea|
|000001f0| 70 2e 0d 0d 09 73 74 61 | 74 69 63 20 6c 6f 6e 67 |p....sta|tic long|
|00000200| 09 09 46 72 65 65 4d 65 | 6d 6f 72 79 28 29 3b 0d |..FreeMe|mory();.|
|00000210| 09 2f 2f 20 52 65 74 75 | 72 6e 20 74 68 65 20 74 |.// Retu|rn the t|
|00000220| 6f 74 61 6c 20 61 6d 6f | 75 6e 74 20 6f 66 20 66 |otal amo|unt of f|
|00000230| 72 65 65 20 73 70 61 63 | 65 20 69 6e 20 74 68 65 |ree spac|e in the|
|00000240| 20 68 65 61 70 2e 0d 0d | 09 73 74 61 74 69 63 20 | heap...|.static |
|00000250| 53 69 7a 65 09 09 4d 61 | 78 4d 65 6d 6f 72 79 28 |Size..Ma|xMemory(|
|00000260| 29 3b 0d 0d 09 2f 2f 20 | 52 65 74 75 72 6e 20 74 |);...// |Return t|
|00000270| 68 65 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 6c |he size |of the l|
|00000280| 61 72 67 65 73 74 20 66 | 72 65 65 20 62 6c 6f 63 |argest f|ree bloc|
|00000290| 6b 20 69 6e 20 74 68 65 | 20 68 65 61 70 2e 0d 0d |k in the| heap...|
|000002a0| 09 76 6f 69 64 2a 09 09 | 09 6f 70 65 72 61 74 6f |.void*..|.operato|
|000002b0| 72 20 6e 65 77 28 73 69 | 7a 65 5f 74 20 73 69 7a |r new(si|ze_t siz|
|000002c0| 65 29 3b 0d 09 76 6f 69 | 64 09 09 09 6f 70 65 72 |e);..voi|d...oper|
|000002d0| 61 74 6f 72 20 64 65 6c | 65 74 65 28 76 6f 69 64 |ator del|ete(void|
|000002e0| 2a 20 70 29 3b 0d 09 2f | 2f 20 54 68 65 73 65 20 |* p);../|/ These |
|000002f0| 61 72 65 20 6f 75 72 20 | 73 70 65 63 69 61 6c 20 |are our |special |
|00000300| 61 6c 6c 6f 63 61 74 69 | 6f 6e 20 61 6e 64 0d 09 |allocati|on and..|
|00000310| 2f 2f 20 64 65 61 6c 6c | 6f 63 61 74 69 6f 6e 20 |// deall|ocation |
|00000320| 6f 70 65 72 61 74 6f 72 | 73 2e 0d 0d 70 72 69 76 |operator|s...priv|
|00000330| 61 74 65 3a 0d 09 73 74 | 61 74 69 63 20 54 48 7a |ate:..st|atic THz|
|00000340| 09 09 66 5a 6f 6e 65 3b | 09 2f 2f 20 4f 75 72 20 |..fZone;|.// Our |
|00000350| 70 72 69 76 61 74 65 20 | 7a 6f 6e 65 20 70 6f 69 |private |zone poi|
|00000360| 6e 74 65 72 2e 0d 7d 3b | 0d 0d 23 65 6e 64 69 66 |nter..};|..#endif|
|00000370| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000390| 74 6f 72 73 2e 0d 70 72 | 69 76 61 74 65 3a 0d 09 |tors..pr|ivate:..|
|000003a0| 73 74 61 74 69 63 20 54 | 48 7a 09 66 5a 6f 6e 65 |static T|Hz.fZone|
|000003b0| 0b 50 74 72 4f 62 6a 65 | 63 74 2e 68 02 00 00 00 |.PtrObje|ct.h....|
|000003c0| 54 45 58 54 4d 50 53 20 | 01 00 00 00 00 80 00 00 |TEXTMPS |........|
|000003d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 80 |..TEXTMP|S ......|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 a2 ec 57 39 00 00 | 02 f1 00 00 01 ac 93 73 |....W9..|.......s|
|00000400| 00 22 00 00 93 95 00 00 | 00 00 93 95 01 b4 00 00 |."......|........|
|00000410| 95 49 00 00 00 00 95 49 | 00 00 00 00 95 49 00 20 |.I.....I|.....I. |
|00000420| 00 00 95 69 00 00 00 00 | 95 69 00 00 00 00 95 69 |...i....|.i.....i|
|00000430| 00 00 00 00 95 69 00 00 | 00 23 00 05 00 00 00 00 |.....i..|.#......|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 00 1e 00 35 01 f9 | 03 76 03 e3 00 31 00 0a |.....5..|.v...1..|
|00000490| 03 72 01 f4 00 00 00 00 | 00 00 00 00 00 00 00 00 |.r......|........|
|000004a0| 00 00 00 00 00 48 00 0c | 4d 6f 6e 61 63 6f 00 0a |.....H..|Monaco..|
|000004b0| 00 00 00 00 01 80 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 07 00 04 00 64 00 1c |........|.....d..|
|000004d0| 01 dd 02 3d 00 64 00 1c | 01 dd 02 3d a2 ec 3f 61 |...=.d..|...=..?a|
|000004e0| 00 00 02 f1 00 00 02 f1 | 00 00 01 74 01 00 00 00 |........|...t....|
|000004f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 23 |.....n..|.n...>.#|
|00000500| 24 cc 10 e6 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |$.......|.>..MPSR|
|00000510| 00 01 00 0a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 03 ed ff ff 00 00 00 22 | 00 24 c9 88 00 00 00 00 |......."|.$......|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+